package com.chen.ssm.service.impl;

import com.chen.ssm.dao.TicketOrderDao;
import com.chen.ssm.entity.Ticketorder;
import com.chen.ssm.entity.User;
import com.chen.ssm.service.TicketOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * com.chen.ssm.service.impl
 * 作者      : 金博超
 * 描述      :
 * 创建日期  : 2020/11/11
 * 修改日期  :
 */

@Service("ticketOrderService")
public class ITicketOrderService implements TicketOrderService {

  @Autowired
  private TicketOrderDao ticketOrderDao;

  public int deleteByPrimaryKey(Integer id) {
    return ticketOrderDao.deleteByPrimaryKey(id);
  }

  public int insert(Ticketorder record) {
    return ticketOrderDao.insert(record);
  }

  public int insertSelective(Ticketorder record) {
    return ticketOrderDao.insertSelective(record);
  }

  public int updateByPrimaryKeySelective(Ticketorder record) {
    return ticketOrderDao.updateByPrimaryKeySelective(record);
  }

  public int updateByPrimaryKey(Ticketorder record) {
    return ticketOrderDao.updateByPrimaryKey(record);
  }

  public int getCount(Ticketorder record) {
    return ticketOrderDao.getCount(record);
  }

  public List<Ticketorder> getList(Ticketorder record) {
    return ticketOrderDao.getList(record);
  }

  public List<Ticketorder> getTicketOrderByUserName(String userName) {
    return ticketOrderDao.getTicketOrderByUserName(userName);
  }

  public Ticketorder selectByPrimaryKey(Integer id) {
    return ticketOrderDao.selectByPrimaryKey(id);
  }

  public List<Ticketorder> selectListByUserId(Integer userId) {
    return ticketOrderDao.selectListByUserId(userId);
  }

  public List<Ticketorder> selectListByFlightId(Integer flightId) {
    return ticketOrderDao.selectListByFlightId(flightId);
  }

  public int getTKCount(User user) {
    return ticketOrderDao.getTKCount(user);
  }

  public List<Ticketorder> getListByUser(User user) {
    return ticketOrderDao.getListByUser(user);
  }
}
